<?php

/**
 * Test form.
 *
 * @package    elearning
 * @subpackage form
 * @author     Your name here
 */
class TestForm extends BaseTestForm
{
  public function configure()
  {
  		unset( $this['created_at'] , $this['updated_at'] );
		$test = $this->getObject();
		if( $test->getTestStatus() == 0 )
			$test->setTestStatus(NULL);		
		$this->validatorSchema['test_status'] =  new sfValidatorInteger( array('required' => false ));
		$this->widgetSchema['test_status'] = new sfWidgetFormInputCheckbox(array("value_attribute_value" => 1),array('value' => 1));
		//$this->widgetSchema['test_status'] = new sfWidgetFormInputCheckbox();
		
		
	    $this->widgetSchema->setNameFormat('test[%s]');
		$this->setDefaults( array('create_at' => time(), 'update_at' => time(), 'test_status' => 0 ) );
		
  }
}
